import VueRouter from 'vue-router'

import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import newList from './components/new/newList.vue'
import newDetail from './components/new/newDetail.vue'
import photoList from './components/photo/photoList.vue'
import photoDetail from './components/photo/photoDetail.vue'
import GoodList from './components/good/GoodList.vue'
import GoodInfo from './components/good/goodInfo.vue'
import GoodPic from './components/good/goodPic.vue'
import Goodcomments from './components/good/goodcomment.vue'
var router = new VueRouter({
	routes: [
		{ path:'/', redirect: '/home'},
		{ path: '/home', component: HomeContainer },
		{ path: '/member', component: MemberContainer },
		{ path: '/search', component: SearchContainer },
		{ path: '/shopcar', component: ShopcarContainer },
		{ path: '/home/newList', component: newList},
		{ path: '/home/newDetail/:id', component: newDetail},
		{ path: '/home/photoList', component: photoList},
		{ path: '/home/photoDetail/:id', component:photoDetail},
		{ path: '/home/GoodList', component:GoodList},
		{ path: '/home/GoodInfo/:id', component:GoodInfo, name:'GoodInfo'},
		{ path: '/home/GoodPic/:id', component:GoodPic, name:'GoodPic'},
		{ path: '/home/Goodcomments/:id', component:Goodcomments, name:'Goodcomments'},
	],
	linkActiveClass: 'mui-active' //覆盖默认的路由高亮的了类，替换router-link-active
})

export default router